/* "Barrel" of Http Interceptors */
import { HTTP_INTERCEPTORS } from '@angular/common/http';

import { ResponseInterceptor } from './response-interceptor'; // 响应到后台数据时拦截
import { RequestInterceptor } from './request-interceptor';   // 请求前拦截
import { ErrorResponseInterceptor } from './error-response-interceptor'; // 响应出错时拦截

/** Http interceptor providers in outside-in order */
export const httpInterceptorProviders = [
    { provide: HTTP_INTERCEPTORS, useClass: RequestInterceptor, multi: true },
    { provide: HTTP_INTERCEPTORS, useClass: ResponseInterceptor, multi: true },
    { provide: HTTP_INTERCEPTORS, useClass: ErrorResponseInterceptor, multi: true },
]